package cn.copera.dyy.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import cn.copera.dyy.common.service.BaseService;
import cn.copera.dyy.dao.PointPraiseSetDao;
import cn.copera.dyy.entity.PointPraiseSet;

/**
 * 店铺点赞设置Service
 * 
 */
@Service
@Transactional(readOnly = true)
public class PointPraiseSetService extends BaseService {

	@Autowired
	private PointPraiseSetDao pointPraiseSetDao;

	@Transactional(readOnly = false)
	public void save(PointPraiseSet pointPraiseSet) {
		pointPraiseSetDao.clear();
		pointPraiseSetDao.save(pointPraiseSet);
	}
	public PointPraiseSet findPointPraiseSeByShop(String shopId,String type){
		return pointPraiseSetDao.findExistEntity(new PointPraiseSet(), "shop.id='"+shopId+"' and type='"+type+"'");
	}
	
	
}
